import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: (resolve) => require(['./views/index.vue'], resolve)
    },
    {
      path: '/about',
      name: 'about',
      component: (resolve) => require(['./views/About.vue'], resolve)
    },
    {
      path: '/demo',
      name: 'demo',
      beforeEnter (fo, from, next) {
        window.location = '/demo.html'
      }
    },
    {
      path: '/desktop',
      name: 'desktop',
      beforeEnter (fo, from, next) {
        window.location = '/desktop.html'
      }
    }
  ]
})
